﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Proto
{
    using System.Threading;

    using Proto.Fields;
    using Proto.Providers;
    using Proto.Util;

    static partial class Program
    {
        private static bool m_StopUpdate = false;
        private static bool m_StopAddition = false;
        static void Main(string[] args)
        {
            RunnerRegistry.INTEGRATION.Start();
            RunnerRegistry.APP.Start();
            RunnerRegistry.GUI.Start();

            RunnerRegistry.GUI.Enqueue( UpdateTest );

            Console.WriteLine("Any key to run addition test... ");
            Console.ReadKey();
            m_StopUpdate = true;

            
            Thread.Sleep(1000);
            number_updates = number_additions = number_non_empty_addition = 0;
            
            RunnerRegistry.GUI.Enqueue( PureAdditionTest );
            Console.WriteLine("Any key to exit... ");
            Console.ReadKey();
            m_StopAddition = true;


            RunnerRegistry.APP.Stop(TimeSpan.FromSeconds(5));
            RunnerRegistry.INTEGRATION.Stop(TimeSpan.FromSeconds(5));
            RunnerRegistry.GUI.Stop(TimeSpan.FromSeconds(5));
        }
    }
}
